package ReviewTest;

public class Person {
    private String name;
    private double height;
    private int weight;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public void showBMI() {
        double bmi = weight / (height * height);
        System.out.println("姓名：" + name + " " + "体重：" + weight + " "
                + "身高：" + height + " " + "体质指数：" + bmi);
    }
}
